/**
 * 版权所有 (TMS)
 */
package com.xiweicheng.test.jpa.postgres;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * @author xiweicheng
 * @date 2021/8/28 12:33 下午
 */
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_user")
public class User {

    @Id
    @GeneratedValue(
            strategy = GenerationType.SEQUENCE,
            generator = "seq_id"
    )
    @SequenceGenerator(
            name = "seq_id",
            allocationSize = 1
    )
    private Long id;

    private String name;
}
